.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
.\"See Also:
.\"man mdoc.samples for a complete listing of options
.\"man mdoc for the short list of editing options
.\"/usr/share/misc/mdoc.template
.\"
.\" nroff -msafer -mandoc see.1 | less
.\"
.Dd May 26, 2014               \" DATE
.Dt SEE "" "SubEthaEdit Command Line Manual"     \" Program name and manual section number 
.Os "Mac OS X"
.Sh NAME                 \" Section Header - required - don't modify 
.Nm see
.\" The following lines are read in generating the apropos(man -k) database. Use only key
.\" words here as the database is built based on the words here and in the .ND line. 
.\" .Nm Other_name_for_same_program(),
.\" .Nm Yet another name for the same program.
.\" Use .Nm macro to designate other names for the documented program.
.Nd Command line interface for SubEthaEdit.
.Sh SYNOPSIS             \" Section Header - required - don't modify
.Nm
.Op Fl bdhlprvw
.Op Fl e Ar encoding_name
.Op Fl g Ar line\fP[:\fIcolumn\fP[,\fIlength\fP ] ]
.Op Fl j Ar string
.Op Fl m Ar mode_identifier
.Op Fl o Ar where
.Op Fl t Ar string
.\" .Op Ar file              \" [file]
.Op Ar                   \" [file ...]
.\" .Ar arg0                 \" Underlined argument - use .Ar anywhere to underline
.\" arg2 ...                 \" Arguments
.Sh DESCRIPTION          \" Section Header - required - don't modify
The
.Nm
command allows you to open files in SubEthaEdit via the command line. You can specify one or more file names as arguments for the
.Nm
command to open the corresponding files in SubEthaEdit. It creates a new document for each file name argument that doesn't have a file associated with it and sets the window title to the file name.
.Pp 
.Nm
also reads from stdin when no file name is specified on the command line or it's preceded by a pipe. It writes the contents of the opened files to stdout once you close them in SubEthaEdit and the invoked
.Nm
command is followed by a pipe.
.Pp                      \" Inserts a space
The options are as follows:
.Bl -tag -width -indent  \" Differs from above in tag removed
.It Fl b, -background
Keep SubEthaEdit in the background or launch it in the background if it's not already running.
.It Fl e, -encoding Ar name
Specify the internet name of an encoding to open the specified file(s) using that encoding.
.It Fl g, -goto Ar line\fP[:\fIcolumn\fP[,\fIlength\fP ] ]
Set the selection to the specified line, column and length. If only line is given the whole line is selected. If line and column is given, a selection with length 0 is set. So select arbitary character ranges use 1:start,length.
.It Fl h, -help
Display usage information and exit.
.It Fl j, -job-description Ar string
Specify a string describing the context in which the command is used. The string will augment the window titles of all opened documents providing the context of the job in the user interface.
.It Fl l, -launch
Launch SubEthaEdit or activate it, if it's already running.
.It Fl m, -mode Ar identifier
Specify the identifier of a mode to open the specified file(s) using that mode.
.It Fl o, -open-in Ar [\fIwhere\fP ]
Specify in which container the files should be openend. Possible containers are: tabs windows new-window.
.It Fl p, -print
Print the specified file(s) on the default printer.
.It Fl r, -resume
Bring the application which was in the foreground when the 
.Nm
command was invoked to the foreground again.
.It Fl d, -pipe-dirty
Make the document containing the text from stdin dirty so it shows a dialog on close.
.It Fl t, -pipe-title Ar string
Specify a string which should be used as the window title for the document containing the text from stdin.
.It Fl v, -version
Display version information and exit.
.It Fl w, -wait
Wait until all specified files have been closed in SubEthaEdit. Set the EDITOR environment variable to \&"see -w\&" to use
the 
.Nm
command as an external editor for UNIX commands.
.El                      \" Ends the list
.Pp
.\" .Sh ENVIRONMENT      \" May not be needed
.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
.\" .It Ev ENV_VAR_1
.\" Description of ENV_VAR_1
.\" .It Ev ENV_VAR_2
.\" Description of ENV_VAR_2
.\" .El                      
.\" .Sh FILES                \" File used or created by the topic of the man page
.Sh EXAMPLES
Open a file using UTF-8 encoding:
.Pp
.Dl see --encoding utf-8 index.html
.Pp
Open a file using XML mode:
.Pp
.Dl see --mode XML environment.plist
.Pp
Select the 8th line in .bash_profile:
.Pp
.Dl see --goto 8 .bash_rc
.Pp
Put the insertion point at the beginning of the 8th line in .bash_profile:
.Pp
.Dl see -g 8:0 .bash_rc
.Pp
Pipe all not yet added files of an subversion working copy into a SubEthaEdit document and execute the contents of the document on close so all files still present will be added to the working copy:
.Pp
.Dl svn st | grep '^?' | sed -e 's/?[ ]*/svn add /g' | see -r -t \&"svn st\&" -j \&"->to sh\&" | sh
.\" .Sh BUGS              \" Document known, unremedied bugs 
.\" .Sh HISTORY           \" Document history if command behaves in a unique manner 
.Sh AUTHOR
SubEthaEdit Contributors <https://subethaedit.net/>
.\" .Sh SEE ALSO
